<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <th:block th:replace="include/css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/bbs.css">
    <title>论坛</title>
</head>
<body>
<th:block th:replace="include/header:: header"/>
<div class="main">
    <div class="left">
        <div class="cate-item" th:each="category:${categories}">
            <div class="p-cate"><a th:href="'/bbs/board/'+${category.categoryId}" th:text="${category.name}"></a></div>

            <div class="sub-cate">
                <div class="sub-cate-item" th:each="child:${category.children}">
                    <div class="sub-cate-item-icon"><img src="/static/images/topic.png"></div>
                    <div class="sub-cate-item-info">
                        <div>
                            <div class="sub-cate-item-name">
                                <a th:href="'/tp/sub/board/'+${child.categoryId}" th:text="${child.name}"></a>
                            </div>
                        </div>
                        <div>
                            <div class="sub-cate-item-count">
                                <span class="topic-count" th:text="'主题：'+${child.count eq null ?'0':child.count}"></span>
                                今日：<span th:text="${child.todayCount eq null ? '0':child.todayCount}"></span>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>


    <div class="right">
        <div class="count-info">
            <p><span class="day-count" th:text="'今日帖子：'+${today}">12312 </span><span
                    th:text="'昨日帖子：'+${yesterdayCount}">232131</span></p>
            <p>总帖子：312312</p>
        </div>
        <div>
            <a href="javascript:;" class="btn btn-info public-btn" id="publicTopicBtn">
                <i class="icon icon-post-topic"></i>
                <span>我要发帖</span>
            </a>
        </div>
        <div class="active-user">
            <div class="active-user-title"><i class="icon active-user-title-icon"></i>活跃用户(TOP20)</div>
            <div class="active-user-icon">
                <ul>

                    <li th:each="user:${activeUser}">
                        <a th:href="'/user/'+${user.userId}">
                            <img class="img-circle" th:src="'/static/images/'+${user.userIcon}"
                                 style="display:inline;"/>
                            <span th:text="${user.userName}"></span>
                            <span class="post-count" th:text="'发帖：'+${user.topicCount}">发帖：</span>
                        </a>
                    </li>
                </ul>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<th:block th:replace="include/footer:: footer"/>
<th:block th:replace="include/top"/>
<script type="text/javascript" src="/static/js/bbs.js"></script>
</body>
</html>